// 删除字符
import { Operation } from "./operation"
export class RemoveTextOperation extends Operation {
    startIndex_;
    endIndex_;
    /**
     * 删除字符需要知道：从哪删除，删除到哪
     * @param {*} startIndex 删除字符开始的位置
     * @param {*} endIndex 删除字符结束的位置
     */
    constructor (startIndex, endIndex) {
        super()
        this.startIndex_ = startIndex
        this.endIndex_ = endIndex
    }
    apply (editor) {
        editor.getTextModel().remove(this.startIndex_, this.endIndex_);
    }
}
export default RemoveTextOperation